class Test {
  String id;
  String name;
  bool joinExam;
  DateTime publishDate;
  double ratio;

  Test({
    this.id,
    this.name,
    this.joinExam,
    this.publishDate,
    this.ratio,
  });

  factory Test.fromJson(Map<String, dynamic> json) {
    return Test(
      id: json['id'],
      name: json['name'],
      joinExam: json['joinExam'],
      publishDate: json['createTime'] == null ? null : DateTime.parse(json['createTime']),
      ratio: json['ratio'],
    );
  }
}
